<?php
class VideoController extends Controller_Helper
{
    public function indexAction()
    {
        $className = get_class();
        $classType = strtolower(preg_replace('/Controller/', '', $className));
        $this->_getSpecialInfo($classType);
        $articleList = $this->_getArticleList($classType);
        
        $videoid = (int)$this->_request->getParam('video');
        if (empty($videoid) || !$this->_validator->isValid($videoid)) {
            $table = Zend_Registry::get('database')->article;
            if (empty($articleList)) {
                $this->view->vedioDetail = array();
            } else {
                $videoid = $articleList[0][$table->id];
                $this->view->vedioDetail = Business_Article::getInstance()->getArticleDetails($videoid);
            }
        } else {
        	$this->view->vedioDetail = Business_Article::getInstance()->getArticleDetails($videoid);
        }
    }
}